package mango.server.database;

import java.util.*;
import java.io.*;

public class Database {

	protected static LinkedList<User> userData;

	protected static LinkedList<User> activeUsers;

	protected static LinkedList<Player> activePlayers;

	protected static LinkedList<Pokemon> pokedex;

	private mango.server.MangoServer parent;

	public Database (mango.server.MangoServer p) {
		
		parent = p;
		
		// Load User Data
		File users = new File("userData.msd");
		Scanner scan = null;
		try {
			scan = new Scanner(users);
		} catch (FileNotFoundException e) {
			try {
				boolean success = users.createNewFile();
				if (!success) {
					parent.println("<!> Cannot create userData.msd");
					parent.safeShutdown();
				}
			} catch (IOException e2) {
				parent.println("<!> Cannot create userData.msd: "+e2);
				parent.safeShutdown();
			}
			
			
		}
		
		//while (scan.hasNext()) {
			
		//}
		
	}
}
